package com.guiguli.Collection_foeEach;

import java.util.ArrayList;
import java.util.Collection;

public class Demo1 {
    public static void main(String[] args) {
        Collection<String>str = new ArrayList<>();
        str.add("21111");
        str.add("666");
        str.add("离谱");
        //传入一个lambda进行遍历
        str.forEach(s-> System.out.println(s));
    }
}
